2908c1
@@ -127,9 +127,10 @@
public class CellCounter extends Configured implements Tool {
           if (!thisRowFamilyName.equals(currentFamilyName)) {
             currentFamilyName = thisRowFamilyName;
             context.getCounter("CF", thisRowFamilyName).increment(1);
-            context.write(new Text("Total Families Across all Rows"),
-              new IntWritable(1));
-            context.write(new Text(thisRowFamilyName), new IntWritable(1));
+            if (1 == context.getCounter("CF", thisRowFamilyName).getValue()) {
+              context.write(new Text("Total Families Across all Rows"), new IntWritable(1));
+              context.write(new Text(thisRowFamilyName), new IntWritable(1));
+            }
           }
           String thisRowQualifierName = thisRowFamilyName + separator
               + Bytes.toStringBinary(CellUtil.cloneQualifier(value));
